/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.chapter5.designpatters.creationpatterns.abstractfactory;

import za.ac.cput.chapter5.designpatters.creationpatterns.factorymethod.factorymethodimplementation.Cat;
import za.ac.cput.chapter5.designpatters.creationpatterns.factorymethod.factorymethodimplementation.Dog;
import za.ac.cput.chapter5.designpatters.creationpatterns.factorymethod.factorymethodinterface.Animal;

/**
 *
 * @author Sakhe
 */
public class MammalFactory extends SpeciesFactory{
   
     @Override
    public Animal getAnimal(String type){
    if("dog".equals(type)){
    return new Dog();
    } else {
    return new Cat();
    }
     }
}
